<?php /*a:1:{s:70:"D:\AppServ\www\1803010144\app\zhongkl_forum\view\answer\errortest.html";i:1616469669;}*/ ?>
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>第一周测试</title>
    <link rel="stylesheet" href="/1803010144/public/static/zhongkl_forum/CSS/answer.css">
    <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
    <style>
        .exam{
            border-top: 1px solid #a57e7e;
            margin: 20px 20px;
        }
        #paperName{
            text-align: center;
        }
        .exam h4{
            margin: 10px 0;
            font-weight: 400;
        }
        .answer{
            padding-left: 10px;
            font: bold;
            color: rgb(72, 49, 162);
            font-weight: 600;
        }
    </style>
</head>

<body>
    <div class="container">
        <div class="nav">
            <ul>
                <a href="<?php echo url('Answer/index'); ?>" class="subNav">
                    <li>测试</li>
                </a>
                <a href="<?php echo url('Answer/score'); ?>" class="subNav">
                    <li>查看结果</li>
                </a>
                <a href="" class="subNav">
                    <li>当前身份</li>
                </a>
                <a href="<?php echo url('Answer/lssue'); ?>">
                    <li>发布试题</li>
                </a>
            </ul>
        </div>
        <div class="content">
            <h2 id="paperName"><?php echo htmlentities($paperName['p_name']); ?></h2>
            <div>
                <?php if(is_array($ex) || $ex instanceof \think\Collection || $ex instanceof \think\Paginator): $i = 0; $__LIST__ = $ex;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$ex): $mod = ($i % 2 );++$i;?>
                    <div class="exam">
                        <h3><?php echo htmlentities($i); ?>、<?php echo htmlentities($ex['q_name']); ?> </h3>
                        <h4 >你所选择答案<span class="answer"><?php echo htmlentities($ex['s_answer']); ?></span></br>正确答案<span class="answer"><?php echo htmlentities($ex['q_answer']); ?></span></h4>
                        <h4><?php echo htmlentities($ex['A']); ?></h4>
                        <h4><?php echo htmlentities($ex['B']); ?></h4>
                        <h4><?php echo htmlentities($ex['C']); ?></h4>
                        <h4><?php echo htmlentities($ex['D']); ?></h4>
                        <h4><?php echo htmlentities($ex['E']); ?></h4>
                        <h4><?php echo htmlentities($ex['F']); ?></h4>
                        <form action="<?php echo url('Answer/note',['q_id' => $ex['q_id']]); ?>" method="post">
                            <?php if(($ex['n_note'])): ?>
                                <p>笔记：<?php echo htmlentities($ex['n_note']); ?></p>
                            <?php endif; ?>
                            <input type="hidden" class="<?php echo htmlentities($ex['q_id']); ?>" name="button">
                                <textarea name="noteText" cols="50" rows="1" placeholder="笔记"></textarea>
                            <button name="add"  id=<?php echo htmlentities($ex['q_id']); ?> >添加</button>
                            <?php if(($ex['n_note'])): ?>
                            <button id=<?php echo htmlentities($ex['q_id']); ?> name="update">修改</button>
                            <button id=<?php echo htmlentities($ex['q_id']); ?> name="del"  >删除</button>
                            <?php endif; ?>
                        </form>
                    </div>
                <?php endforeach; endif; else: echo "" ;endif; ?>
            </div>
        </div>
        <script>
            $(function(){
                $('button').click(function(){
                    var name =$(this).attr("name");
                    var id = $(this).attr("id");
                    $('.' + id).val(name);
                })
            })
        </script>
    </div>
</body>

</html>